1. Field of the Invention
The present invention relates to an image processing method in which the lines are thinned. A predetermined background pixel value is first assigned to boundary pixels. Pixels are then analyzed sequentially and are assigned a background pixel value based on the results of previous analysis. A pixel configuration is thus transformed into a thinned configuration in which the characteristics of the original are preserved.
2. Description of the Related Art
In some images, such as the microscopic image of a crystalline structure, a boundary of the surface of the object being imaged comes out as a line with a width of more than one pixel. It is impossible to measure the object without transforming this line into a line with a width of one pixel. It is thus necessary to transform the boundary into a line with a one pixel width by thinning. However, it is impossible to measure an object accurately when the boundary line is discontinuous and when adjacent objects are fused to each other during thinning. Therefore, in order to prevent incorrect measurements, the following constraints must be met:
1) the width of the thinned line must be 1; PA1 2) the position of the line must be substantially in the center of the original object; PA1 3) continuity of the object must be preserved; PA1 4) the end part of the thinned line must not be contracted; PA1 5) a spike-like line must not be generated by unevenness in the thinned line; and PA1 6) the thinned line must not be deformed at the intersection of objects.
Items 1) to 4) are called the basic conditions of thinning, and they must be satisfied first in any thinning algorithm. See Hasegawa, Junichi: Image Processing on Personal Computer, Published by Gijutsuhyoronsha, p. 66-67, 1986.
A conventionally known and highly evaluated thinning method is Hilditch's method. The processing speed of Hilditch's method is insufficient, however, because the method counts the number of connectedness of the pixels in the object and of the background pixels. To solve the above problem, a method disclosed in Japanese Patent Publication Number SHO 64-13680 is known. However, this method completely loses objects when a line which changes width from 3 pixels to 2 pixels (See FIG. 1) is processed.